package com.haulmont.asu.entity;

import com.haulmont.chile.core.annotations.Composition;

import javax.persistence.*;
import java.util.List;

/**
 * Author: Sergey42
 * Date: 17.11.13 19:47
 */
@Table(name = "EXT_THEME_BOOKING_COMMAND")
@Entity(name = "ext$ThemeBookingCommand")
@DiscriminatorValue("120")
@PrimaryKeyJoinColumn(name = "COMMAND_ID", referencedColumnName = "ID")
public class ThemeBookingCommand extends Command {

    private static final long serialVersionUID = 4046727456699887857L;

    @OneToMany(mappedBy = "themeBookingCommand")
    @Composition
    protected List<ProjectThemeBooking> projectThemeBookings;

    @ManyToOne
    @JoinColumn(name = "CATHEDRA_ID")
    protected Cathedra cathedra;

    public List<ProjectThemeBooking> getProjectThemeBookings() {
        return projectThemeBookings;
    }

    public void setProjectThemeBookings(List<ProjectThemeBooking> projectThemeBookings) {
        this.projectThemeBookings = projectThemeBookings;
    }

    public Cathedra getCathedra() {
        return cathedra;
    }

    public void setCathedra(Cathedra cathedra) {
        this.cathedra = cathedra;
    }
}
